using System.Web.UI.WebControls;

using SBPweb.Data;

namespace SBPweb.Controls.Web
{
	public delegate void EntityGridViewSelectEventHandler(object sender, EntityGridViewSelectEventArgs e);

	public class EntityGridViewSelectEventArgs : GridViewSelectEventArgs
	{

		#region Private fields

		private Entity mEntity;

		#endregion

		#region Constructor logic

		internal EntityGridViewSelectEventArgs(int newSelectedIndex, Entity entity)
			: base(newSelectedIndex)
		{
			base.NewSelectedIndex = newSelectedIndex;
			mEntity = entity;
		}

		internal EntityGridViewSelectEventArgs(GridViewSelectEventArgs originalArgs, Entity entity)
			: base(originalArgs.NewSelectedIndex)
		{
			base.NewSelectedIndex = originalArgs.NewSelectedIndex;
			mEntity = entity;
		}

		#endregion

		#region Public property accessors

		public Entity NewSelectedEntity
		{
			get
			{
				return mEntity;
			}
			protected internal set
			{
				mEntity = value;
			}
		}

		#endregion

	}

}